<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:with="title='保存文章',active='upload'">
<header th:replace="admin/header::headerFragment(${title},${active})"></header>
<link th:href="@{/admin/plugins/tagsinput/jquery.tagsinput.css}" rel="stylesheet"/>
<link th:href="@{/admin/plugins/select2.dist.css/select2-bootstrap.css}" rel="stylesheet"/>
<link th:href="@{/admin/plugins/toggles/toggles.css}" rel="stylesheet"/>

<!--<link href="//cdn.bootcss.com/multi-select/0.9.12/css/multi-select.css" rel="stylesheet"/>
<link href="//cdn.bootcss.com/select2/3.4.8/select2.min.css" rel="stylesheet"/>-->
<link th:href="@{/multi-select/0.9.12/css/multi-select.css}" rel="stylesheet"/>
<link th:href="@{/select2/3.4.8/select2.min.css}" rel="stylesheet"/>
<link th:href="@{/admin/plugins/md/css/style.css}" rel="stylesheet"/>
<style>
    #tags_tagsinput {
        background-color: #fafafa;
        border: 1px solid #eeeeee;
    }

    #tags_addTag input {
        width: 100%;
    }

    #tags_addTag {
        margin-top: -5px;
    }
</style>
<body class="fixed-left">
<div id="wrapper">
    <div th:replace="admin/header::header-body"></div>
    <div class="content-page">
        <div class="content">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12">
                        <h4 class="page-title">
                            <th:block th:if="${null != upload}">
                                文件信息修改
                            </th:block>
                        </h4>
                    </div>
                    <div class="col-md-12">

                            <div class="panel panel-color panel-primary">
                                <div class="panel-heading">
                                    <h3 class="panel-title">文件信息修改</h3>
                                </div>
                                <div class="panel-body">
                                    <form class="form-horizontal" role="form" id="global-form">
                                        <input type="hidden" name="id" id="id" th:value="${upload.id}"/>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件名称</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="fname" placeholder="文件名称"
                                                       th:value="${upload.fname}" required="required" aria-required="true"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件显示名称</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="showName" placeholder="文件显示名称"
                                                       th:value="${upload.showName}" required="required" aria-required="true"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件类型</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="ftype" placeholder="文件类型"
                                                       th:value="${upload.ftype}" required="required" aria-required="true"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件子目录路径</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="subPath" placeholder="文件子目录路径"
                                                       th:value="${upload.subPath}" required="required" aria-required="true"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件真实路径</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="fkey" placeholder="文件真实路径"
                                                       th:value="${upload.fkey}" required="required" aria-required="true"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件链接</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="url" placeholder="文件链接"
                                                       th:value="${upload.url}" required="required" aria-required="true"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label">MarkdownCode</label>
                                            <div class="col-md-9">
                                                <input type="text" class="form-control" name="markdownCode" placeholder="MarkdownCode"
                                                       th:value="${upload.markdownCode}" required="required" aria-required="true"/>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-md-3 control-label">文件状态</label>
                                            <div class="col-md-9">
                                                <select name="delFlag" class="form-control">
                                                    <option value="1" th:selected="${upload.delFlag}">删除</option>
                                                    <option value="0" th:selected="${!upload.delFlag}">正常</option>
                                                </select>
                                            </div>
                                        </div>

                                        <input type="hidden" name="allow_install" id="allow_install"/>
                                        <div class="clearfix pull-right">
                                            <button type="button" class="btn btn-primary waves-effect waves-light" onclick="window.history.back();">
                                                返回上一步
                                            </button>
                                            <button type="button" class="btn btn-primary waves-effect waves-light" onclick="saveInfo()">
                                                保存设置
                                            </button>
                                        </div>
                                    </form>
                                </div>
                            </div>



                    </div>
                </div>
                <div th:replace="admin/footer :: footer-content"></div>
            </div>
        </div>
    </div>
</div>
<div th:replace="admin/footer :: footer"></div>

<script th:src="@{/admin/plugins/tagsinput/jquery.tagsinput.min.js}"></script>
<script th:src="@{/admin/plugins/jquery-multi-select/jquery.quicksearch.js}"></script>

<script th:src="@{/admin/plugins/md/js/jquery.scrollto.js}"></script>
<script th:src="@{/admin/plugins/md/js/pagedown.js}"></script>
<script th:src="@{/admin/plugins/md/js/pagedown-extra.js}"></script>
<script th:src="@{/admin/plugins/md/js/diff.js}"></script>
<script th:src="@{/admin/plugins/md/js/md.js}"></script>

<!--<script th:src="@{//cdn.bootcss.com/multi-select/0.9.12/js/jquery.multi-select.min.js}"></script>
<script th:src="@{//cdn.bootcss.com/select2/3.4.8/select2.min.js}"></script>
<script th:src="@{//cdn.bootcss.com/jquery-toggles/2.0.4/toggles.min.js}"></script>-->
<script th:src="@{/multi-select/0.9.12/js/jquery.multi-select.min.js}"></script>
<script th:src="@{/select2/3.4.8/select2.min.js}"></script>
<script th:src="@{/jquery-toggles/2.0.4/toggles.min.js}"></script>
<script th:src="@{/admin/js/upload.js}"></script>
</body>

</html>